<template>
  <m-page>
    <!-- 还款结果页 -->
    <m-header title="申请还款"></m-header>

    <div class="repayment_result">
      <div class="result_img">
        <img src="//manhattan.didistatic.com/static/manhattan/do1_JX7bcfXqLpStKRv31xlp" alt="">
      </div>

      <!-- 判断状态 1为还款成功 2为还款失败 -->
      <p class="result_text" v-if="this.isSuccess == '1'">还款申请提交成功</p>
      <p class="result_text" v-if="this.isSuccess == '2'">还款申请提交失败</p>

      <div v-if="this.isSuccess == '1'">
          <p class="repayment_amount">还款金额：
        <ynet-amount :value="300000" has-separator :precision="2" />
        元
      </p>
      <p class="repayment_principal">剩余本息：
        <ynet-amount :value="1700.98" has-separator :precision="2" />
        元
      </p>
      </div>

      <p class="result_descrip" v-if="this.isSuccess == '1'">
        还款申请预计5分钟内处理完成 还款成功后长湘贷额度实时恢复
      </p> 
      <p class="result_descrip" v-if="this.isSuccess == '2'">
        失败原因：<span>{{this.fail_reason}}</span>
      </p> 
    </div>

    <ynet-button type="warning" @click="handClick()">完成</ynet-button>
  </m-page>
</template>

<script>
import { Button , Amount} from "ynet-mobile"
  export default {
    components: {
      [Button.name]:Button,
      [Amount.name]:Amount,
    },
    data() {
      return {
        isSuccess:'1', //1 为还款成功 2 为失败
        fail_reason:'xxxxxxxxx',  //失败原因
      }
    },
    created() {},
    mounted() {},
    watch: {},
    computed: {}
  }
</script>

<style lang="scss" scoped>
  @import './index.scss';
</style>

